<template>
  <el-container>
    <el-aside>
      <div class="aside-top">
        <div class="img"><img src="../../assets/img/hat.png" alt="" /></div>
        <div class="word">餐饮后台管理</div>
      </div>
      <div class="aside-bot">登录系统</div>
    </el-aside>
    <el-main>
      <p class="welcome">欢迎光临</p>
      <div class="login">
        <p class="username">用户名</p>

        <el-input v-model="input" placeholder="请输入用户名" clearable />

        <p>密码</p>
        <el-input v-model="input1" placeholder="请输入密码" show-password />
      </div>
      <p class="forget">忘记密码？点击重置密码</p>
      <el-button type="primary" round @click="handouleclick"
        >立即登录</el-button
      >
      <div class="line-box">
        <div class="line"></div>
        <p class="other">使用其他方式登录</p>
      </div>
      <div class="wechat"><img src="../../assets/img/wechat.png" alt="" /></div>
    </el-main>
  </el-container>
</template>

<script lang="ts">
import { defineComponent, ref } from "vue";
import { useRouter } from "vue-router";
export default defineComponent({
  setup() {
    const router = useRouter();
    function handouleclick() {
      sessionStorage.setItem("token", "true");
      console.log(router);
      router.push("/");
    }
    return {
      input: ref(""),
      input1: ref(""),
      handouleclick,
    };
  },
});
</script>

<style lang="scss" scoped>
.el-container {
  width: 100%;
  height: 100%;
  .el-aside {
    width: 50%;
    height: 100%;
    position: fixed;
    left: 0;
    padding-top: 20%;
    padding-left: 10%;
    display: flex;
    flex-direction: column;
    color: white;
    background-image: url("../../assets/img/background.jpg");
    background-size: cover;
    .aside-top {
      display: flex;

      .img {
        margin-top: 16px;
        margin-right: 12px;
        height: 60px;
        img {
          width: 100%;
          height: 100%;
        }
      }
      .word {
        font-size: 60px;
        font-weight: bold;
      }
    }
    .aside-bot {
      font-size: 50px;
      font-weight: bold;
      margin-left: 120px;
    }
  }
  .el-main {
    width: 50%;
    height: 100%;
    position: fixed;
    right: 0;
    padding-top: 9%;
    padding-left: 10%;
    .welcome {
      font-size: 40px;
      font-weight: bold;
      margin-bottom: 35px;
    }
    .login {
      display: flex;
      flex-direction: column;
      justify-content: space-between;
      height: 40%;
      p {
        font-size: 20px;
      }
      .el-input {
        width: 65%;
      }
    }
    .forget {
      font-size: 14px;
      color: #2994fa;
      text-align: right;
      margin-top: 4%;
      margin-bottom: 4%;
      width: 65%;
    }
    .el-button {
      background-color: #34364c;
      border-color: #34364c;
      min-height: 30px;
      padding: 6px 23px;
      width: 55%;
      margin-left: 5%;
    }
    .line-box {
      width: 55%;
      margin-left: 5%;
      margin-top: 5%;
      position: relative;
      .line {
        border: 0.5px solid #a6a6a6;
      }
      .other {
        color: #a6a6a6;
        width: 40%;
        text-align: center;
        background-color: white;
        position: absolute;
        left: 29%;
        top: -8px;
      }
    }
    .wechat {
      margin-top: 4%;
      margin-left: 30%;
      width: 26px;
      img {
        width: 100%;
        height: 100%;
      }
    }
  }
}
</style>
